package com.cuit.qx.controller;


import com.cuit.qx.entity.MakeUser;
import com.cuit.qx.service.MakeUserService;
import com.cuit.qx.utils.ReturnData;
import com.cuit.qx.utils.ReturnStateCode;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 制作用户
 * </p>
 *
 * @author lcj
 * @since 2021-11-23
 */
@CrossOrigin(origins = "*", maxAge = 3600)
@RestController
@RequestMapping("/api/makeUser")
public class MakeUserController {

    @Resource
    private MakeUserService makeUserService;

    @GetMapping("/list")
    public ReturnData getList(){
        List<MakeUser> list = makeUserService.list();
        if (list.isEmpty()){
            return new ReturnData(ReturnStateCode.SUCCEEBUT);
        }
        return new ReturnData(ReturnStateCode.SUCCEE,list);
    }

}
